<!--
 * @Author: your name
 * @Date: 2020-09-18 01:05:35
 * @LastEditTime: 2020-09-22 20:04:19
 * @LastEditors: Please set LastEditors
 * @Description: v-cloak
 * @FilePath: \vue基础\Vue-Basics\day1\code\code\02.v-cloak的学习.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    [v-clock] {
      display: none;
    }
  </style>
</head>

<body>
  <div id="app">
    <!-- 使用 v-clock 就能解决 插值表达式闪烁的问题 -->
    <p v-cloak>++++++++ {{ msg }} -----------</p>
    <h4 v-text='msg'>=====================</h4>

    <div>{{msg2}}</div>
    <div v-text="msg2"></div>
    <div v-html="msg2">12121212</div>
  </div>
  <script src="node_modules/vue/dist/vue.min.js"></script>
  <script>
    let vm = new Vue({
      el: '#app',
      data: {
        msg: '123',
        msg2: '<h1>哈哈，我是一个大大的H1，我大，我骄傲</h1>',
        mytitle: '这是一个自己定义的title'
      },
      methods: {
        show: () => {
          alert('Hello')
        }
      }
    })
  </script>
</body>

</html>